<?
$sub_menu = "300300";
include_once("./_common.php");

if(!$Mode || $Mode=="")
{
	$Mode="INSERT";
	$g4[title] = "팝업등록";
}
else
{
	$QUERY = "select * from $g4[popup_table] where idx = '$IDX' limit 1";
	$RESULT = mysql_query($QUERY);
	$DATA = mysql_fetch_array($RESULT);
	$g4[title] = "팝업수정";
}
include_once("./admin.head.php");
?>
<table cellpadding="0" cellspacing="0" border="1" width="600" class="table_line" align="center">
<form name="input" method="post" action="popup_update.php">
<input type="hidden" name="Mode" value="<?=$Mode?>">
<input type="hidden" name="IDX" value="<?=$IDX?>">
	<tr>
		<td width="100" class="index">제목</td>
		<td width="500" style="padding-left:5px;padding-right:5px;"><input type="text" name="pop_title" style="width:100%" class="ed" value="<?=$DATA[pop_title]?>"></td>
	</tr>
	<tr>
		<td width="100" class="index">팝업창 넓이</td>
		<td width="500" style="padding-left:5px;"><input type="text" name="pop_width" style="width:100" class="ed" value="<?=$DATA[pop_width]?>"> 픽셀</td>
	</tr>
	<tr>
		<td width="100" class="index">팝업창 높이</td>
		<td width="500" style="padding-left:5px;"><input type="text" name="pop_height" style="width:100" class="ed" value="<?=$DATA[pop_height]?>"> 픽셀</td>
	</tr>
	<tr>
		<td width="100" class="index">가로위치</td>
		<td width="500" style="padding-left:5px;"><input type="text" name="pop_left" style="width:100" class="ed" value="<?=$DATA[pop_left]?>"> 픽셀</td>
	</tr>
	<tr>
		<td width="100" class="index">세로위치</td>
		<td width="500" style="padding-left:5px;"><input type="text" name="pop_top" style="width:100" class="ed" value="<?=$DATA[pop_top]?>"> 픽셀</td>
	</tr>
	<tr>
		<td width="100" class="index">노출유무</td>
		<td width="500" style="padding-left:5px;">
		<select name="pop_use">
			<option value="YES" <?if($DATA[pop_use]=="YES"){echo("selected");}?>>사용</option>
			<option value="NO" <?if($DATA[pop_use]=="NO"){echo("selected");}?>>미사용</option>
		</select>
		</td>
	</tr>
	<tr>
		<td colspan="2">
<textarea id="wr_content" name="pop_content" class=tx style='width:100%;word-break:break-all;height:300px' itemname="내용" required geditor><?=stripslashes($DATA[pop_content])?></textarea>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center" height="40">
		<button class="btn1" style="width:60px" onclick="submit();">확 인</button>&nbsp;
		<button class="btn1" style="width:60px" onclick="history.back(-1);">취 소</button>
		</td>
	</tr>
</form>
</table>
<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript" src="<?="$g4[path]/geditor/geditor.js"?>"></script>
<?
include_once ("./admin.tail.php");
?>